import React, { PropTypes } from 'react';
import style from './index.less'
import { Tabs } from 'antd'


/**
 * [TabsMain 主要内容]
 */
const TabPane = Tabs.TabPane
const TabsMain = ({ children=[],extra=false }) => {
  return (
    // <Tabs tabBarExtraContent={extra} defaultActiveKey="0" style={{ margin: '15px 0' }}>
    <Tabs tabBarExtraContent={extra} defaultActiveKey="0" style={{ margin: '0 0 0 10px ' }}>
      {
        children.map((item, index) => {
          if (!item.props.isblank) {
            return <TabPane tab={item.props.title} key={index}>{item}</TabPane>
          } else {
            return null
          }
        })
      }
    </Tabs>
  )
}

export default TabsMain;
